#ifndef PUBSUBOBJECT_H
#define PUBSUBOBJECT_H

#include <QObject>

class PubSubObject : public QObject
{
    Q_OBJECT
public:
    PubSubObject(QObject *parent = nullptr);
    ~PubSubObject() override;

protected:
    virtual void customEvent(QEvent *event) override;
};

#if 0
#define TestThreadIsLocked(qobject) do{ \
        PubSubObject *test = new PubSubObject(qobject); \
        app->getGlobalMessageQueue()->subscribe(blt::EV_TestThreadIsLocked, test); \
    }while(0)

#else
#define TestThreadIsLocked(qobject)
#endif

#endif // PUBSUBOBJECT_H
